﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Master/FrameMain.Master"
    AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="Frame.Web.Admin.Dept.List" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:HiddenField ID="hidOrders" runat="server" />
    <asp:HiddenField ID="hidHideTrIDs" runat="server" />
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <input id="hiddenClientID" type="hidden" value="<%=hidHideTrIDs.ClientID %>" />
    <div id="toolbar">
        <ul>
            <li><a id="lnkDelete" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/icons/DELETE.gif);">
                &nbsp;</b>删除</span> </a></li>
            <li><a id="lnkMove" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/icons/move.gif);">
                &nbsp;</b>移动</span> </a></li>
            <li><a id="lnkSaveOrders" runat="server" href="javascript:go()"><span><b style="background-image: url(../../common/images/icons/SORT.gif);">
                &nbsp;</b>排序</span> </a></li>
            <li>
                <asp:Button ID="btnDelete" runat="server" Text="删除" CausesValidation="False" CssClass="hide"
                    OnClick="btnDelete_Click" />
                <input id="btnMove" runat="server" type="button" value="移动" class="hide" />
                <asp:Button ID="btnSaveOrders" runat="server" Text="排序" OnClick="btnSaveOrders_Click"
                    CssClass="hide" />
                <asp:Button ID="btnRefresh" runat="server" OnClick="btnRefresh_Click" Text="Button"
                    CssClass="refresh" /></li>
        </ul>
    </div>
    <div id="head">
        <div class="left">
            <asp:Label ID="Label4" runat="server" Text="警告：删除一个部门将会删除该部门及所有子部门！" ForeColor="red"
                Font-Bold="true"></asp:Label>
        </div>
    </div>
    <div id="list">
       
        <asp:HiddenField ID="hidSelectIDs" runat="server" Value="" />
        <table border="0" cellpadding="0" cellspacing="0" width="100%" id="lvList">
            <tr id="lvHeader" runat="server">
                <th class="sp">
                    &nbsp;
                </th>
                <th class="chk">
                    <asp:CheckBox ID="chkSelectAll" runat="server" />
                </th>
                <th>
                    部门名称
                </th>
                <th>
                    排序
                </th>
            </tr>
            <asp:ListView ID="lv" runat="server" OnItemDataBound="lv_ItemDataBound">
                <LayoutTemplate>
                    <tr id="itemPlaceholder" runat="server">
                    </tr>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr runat="server">
                        <td class="sp">
                            &nbsp;
                        </td>
                        <td class="chk">
                            <asp:CheckBox ID="chkSelect" runat="server" />
                        </td>
                        <td>
                            <asp:Literal ID="litSpace" runat="server" Text='<%# Eval("Space") %>'></asp:Literal>
                            <asp:HyperLink ID="lnkName" runat="server" NavigateUrl="javascript:go();" Text='<%# Eval("Name") %>'></asp:HyperLink>
                            <%#"[&nbsp;" + Eval("UserCount") + "个员工&nbsp;]" %>
                            &nbsp;[<asp:HyperLink ID="hypAdd" runat="server" NavigateUrl="javascript:;">添加子部门</asp:HyperLink>]
                            <asp:HiddenField ID="hidUpperID" runat="server" Value='<%# Eval("UpperID") %>' />
                        </td>
                        <td>
                            <asp:TextBox ID="txtOrders" runat="server" Text='<%# Eval("Orders") %>' CssClass="out"></asp:TextBox>
                        </td>
                    </tr>
                </ItemTemplate>
                <EmptyDataTemplate>
                    <tr>
                        <td colspan="4" class="empty">
                            没有部门
                        </td>
                    </tr>
                </EmptyDataTemplate>
            </asp:ListView>
        </table>
    </div>
</asp:Content>
